<%@ Page Language="C#" AutoEventWireup="true"  MasterPageFile="~/MasterPage.master" CodeFile="~/Logistica/HRutasAdmin.aspx.cs" Inherits="Logistica_HRutasAdmin"%>
<%@ Register Src="../UserControls/Fecha.ascx" TagName="Fecha" TagPrefix="uc1" %>

<asp:Content ID="Content1"  ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="text-align: center; vertical-align: text-top;">
        <asp:ScriptManager id="ScriptManager1" runat="server"></asp:ScriptManager>
<table class="tablaForm" style=" width: 550px; text-align:left">
    <tr>
        <td class="tdLogistica" align="right" colspan="4">Administraci&oacute;n de Hojas de Ruta</td>
        </tr>
    <tr>
        <td class="tdLiteral" colspan="4" style="text-align:center">
            <asp:Label ID="lblAccion" runat="server" CssClass="lblAccion" Text="Label"></asp:Label>
        </td>
    </tr>
    <tr id="trFechas" runat="server">
        <td class="tdLiteral" align="right" style="width: 20%">
            Fecha Desde:
            </td>
        <td style="width: 30%" class="tdForm" align="left">
            <uc1:Fecha ID="FechaD" runat="server" />
            
            </td>
         <td class="tdLiteral" align="right" style="width: 20%">
            Fecha Hasta:
            </td>
        <td style="width: 30%" class="tdForm" align="left">
            <uc1:Fecha ID="FechaH" runat="server" />
            
        </td>
    </tr>
    <tr>
        <td align="right" class="tdLiteral" style="width: 20%">
            Estado:</td>
        <td align="left" class="tdForm" colspan="3">
            <asp:DropDownList ID="cboEstado" runat="server" Width="150px" AutoPostBack="True" OnSelectedIndexChanged="cboEstado_SelectedIndexChanged">
                <asp:ListItem Value="0">Pendientes</asp:ListItem>
                <asp:ListItem Value="1">Activas</asp:ListItem>
                <asp:ListItem Value="2">Cerradas</asp:ListItem>
                <asp:ListItem Value="3">Todas</asp:ListItem>
            </asp:DropDownList></td>
    </tr>
    <tr id="trActivas" runat="server">
        <td align="right" class="tdLiteral" style="width: 20%">
            <asp:Label ID="lblItems" runat="server" Text="Con Items para:"></asp:Label>&nbsp;</td>
        <td align="left" class="tdForm" colspan="3"><asp:DropDownList ID="cboItems" runat="server" Width="200px" AutoPostBack="True" OnSelectedIndexChanged="cboItems_SelectedIndexChanged">
            <asp:ListItem Value="1">Entregar</asp:ListItem>
            <asp:ListItem Value="2">Imputar al Cliente</asp:ListItem>
            <asp:ListItem Value="3">Todas</asp:ListItem>
        </asp:DropDownList></td>
    </tr>
    <tr>
        <td align="right" class="tdLiteral" style="width: 20%">
            Nro. Hoja de Ruta:
        </td>
        <td align="left" class="tdForm" colspan="3">
            <asp:TextBox ID="txtIdHRuta" runat="server"></asp:TextBox>
            <asp:RangeValidator ID="rvIdHRuta" runat="server" ControlToValidate="txtIdHRuta"
                ErrorMessage="(*)" MaximumValue="99999999" MinimumValue="1" ValidationGroup="Buscar"></asp:RangeValidator></td>
    </tr>
    <tr>
        <td class="tdBotones" colspan="4" style="height: 26px">
            <asp:Button id="btnBuscar" onclick="btnBuscar_Click" runat="server" Text="Buscar" Width="75px" ValidationGroup="Buscar"></asp:Button>&nbsp;
            <asp:Button ID="btnNuevo" runat="server" OnClick="btnNuevo_Click" Text="Nueva" Width="75px" />&nbsp;
            &nbsp;<asp:Button id="btnCancelar" onclick="btnCancelar_Click" runat="server" Text="Cancelar" Width="75px"></asp:Button>&nbsp;
            <asp:Button ID="btnInforme" onclick="btnInforme_Click" runat="server" Text="Informe" Width="75px"></asp:Button>&nbsp;&nbsp;
            </td>
    </tr>
    <tr>
        <td style="WIDTH: 550px" colspan="4">
            <asp:GridView id="gvHRuta" runat="server" BorderWidth="1px" BackColor="White" Width="100%" OnPageIndexChanging="gvHRuta_PageIndexChanging" 
                OnSelectedIndexChanged="gvHRuta_SelectedIndexChanged" CellPadding="3" AllowPaging="True" AutoGenerateColumns="False" 
                DataKeyNames="IdHRuta" BorderColor="#999999" BorderStyle="None" GridLines="Vertical" EmptyDataText="No hay datos a mostrar">
                <FooterStyle BackColor="#CCCCCC" ForeColor="Black"></FooterStyle>
                <columns>
                    <asp:TemplateField HeaderText="Nro. Hoja">
                        <HeaderStyle ForeColor="White" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <asp:Label id="IdHRuta" runat="server" Text='<%# Bind("IdHRuta") %>'></asp:Label> 
                        </ItemTemplate>
                        </asp:TemplateField>
                      <asp:TemplateField HeaderText="Sucursal">
                        <HeaderStyle ForeColor="White" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <asp:Label id="Sucursal" runat="server" Text='<%# Bind("Sucursal") %>'></asp:Label> 
                        </ItemTemplate>
                        </asp:TemplateField>
                      <asp:TemplateField HeaderText="Cant. P&#225;ginas">
                        <HeaderStyle ForeColor="White" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <asp:Label id="CantPaginas" runat="server" Text='<%# Bind("CantPaginas") %>'></asp:Label> 
                        </ItemTemplate>
                        </asp:TemplateField>
                     <asp:TemplateField HeaderText="Fecha">
                        <HeaderStyle ForeColor="White" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <asp:Label id="Fecha" runat="server" Text='<%# Bind("Fecha", "{0:dd/MM/yyyy}") %>'></asp:Label> 
                        </ItemTemplate>
                        </asp:TemplateField>
                    <asp:TemplateField HeaderText="Estado">
                        <HeaderStyle ForeColor="White" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <asp:Label id="Estado" runat="server" Text='<%# Bind("Estado") %>'></asp:Label> 
                        </ItemTemplate>
                        </asp:TemplateField>
                     <asp:TemplateField HeaderText="D&#237;as">
                        <HeaderStyle ForeColor="White" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <asp:Label id="Dias" runat="server" Text='<%# Bind("Dias") %>'></asp:Label> 
                        </ItemTemplate>
                        </asp:TemplateField>
                    <asp:TemplateField ShowHeader="False">
                        <HeaderStyle ForeColor="White"></HeaderStyle>
                        <ItemTemplate>
                            <asp:LinkButton runat="server" Text="Seleccionar" CommandName="Select" CausesValidation="False" id="LinkButton2"></asp:LinkButton>
                        </ItemTemplate>
                        </asp:TemplateField>
                </columns>
                <RowStyle BackColor="#EEEEEE" ForeColor="Black" HorizontalAlign="Center"></RowStyle>
                <EditRowStyle Wrap="True"></EditRowStyle>
                <SelectedRowStyle BackColor="#008A8C" ForeColor="White" Font-Bold="True"></SelectedRowStyle>
                <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center"></PagerStyle>
                <HeaderStyle BackColor="#325FB9" ForeColor="White" Font-Names="Arial Rounded MT Bold" Font-Bold="True"></HeaderStyle>
                <AlternatingRowStyle BackColor="Gainsboro"></AlternatingRowStyle>
            </asp:GridView>
            </td>
        </tr>
        <tr>
            <td colspan="2" class="tdTit" style="width: 50%; text-align: right;">
                Cantidad Hojas de Ruta :</td>
            <td colspan="2" class="tdLiteral" style="width: 50%; text-align: left;">
                &nbsp;<asp:TextBox ID="txtTotal" runat="server" Font-Bold="True" ReadOnly="True"
                    Width="120px"></asp:TextBox></td>
        </tr>
        </table><br /><br />
    </div>
</asp:Content>
